/**
 * 意哈信息技术有限公司
 */
package com.eha.bbs.filter;

import java.io.IOException;

import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;

/**
 * @author <a href="#" title="MSN/GTalk : lakemove@gmail.com">Jay</a>
 * @since 2007-8-30 下午02:36:27
 */
public class LogonEncodingFilter implements Filter
{

	public void destroy()
	{}

	public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException
	{
		request.setAttribute("o_e", request.getCharacterEncoding());
		System.out.println(request.getCharacterEncoding());
		request.setAttribute("ju", request.getParameter("j_username"));
		System.out.println(request.getParameter("j_username"));
		request.setAttribute("jp", request.getParameter("j_password"));
		System.out.println(request.getParameter("j_password"));
		request.setCharacterEncoding("gb2312");
		chain.doFilter(request, response);
	}

	public void init(FilterConfig arg0) throws ServletException
	{}

}
